This repository was archived by the owner on Jun 24, 2025. It is now read-only.
Fix TypeScript error caused by duplicate Request identifiers#35
Open
devoto13 wants to merge 1 commit intofloatdrop:masterfrom
Open
Fix TypeScript error caused by duplicate Request identifiers#35devoto13 wants to merge 1 commit intofloatdrop:masterfrom
devoto13 wants to merge 1 commit intofloatdrop:masterfrom
Conversation
Only `interface` declarations can be merged and using `type` results in the below error.
```
node_modules/@types/express-serve-static-core/index.d.ts:19:19 - error TS2300: Duplicate identifier 'Request'.
19 interface Request {}
~~~~~~~
node_modules/express-request-id/types.d.ts:7:8
7 type Request = {
~~~~~~~
'Request' was also declared here.
node_modules/express-request-id/types.d.ts:7:8 - error TS2300: Duplicate identifier 'Request'.
7 type Request = {
~~~~~~~
node_modules/@types/express-serve-static-core/index.d.ts:19:19
19 interface Request {}
~~~~~~~
'Request' was also declared here.
```
See https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#differences-between-type-aliases-and-interfaces
|
Is there a work-around for this issue or is |
Author
|
You can use old version, 1.x works IIRC. |
mpsijm
approved these changes
Jun 16, 2023
|
I had the same problem, glad to see that a PR is open to fix this. Hey, @floatdrop, any idea about when this is gonna be merged? :) Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Only
interfacedeclarations can be merged and usingtyperesults in the below error.See https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#differences-between-type-aliases-and-interfaces